<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Shoutbox/classes/PhpFox_ComponentBox.class.php, $Author:  $ */


class PhpFox_Mod_Shoutbox_ComponentBox extends BaseComponent 
{
    function process()
    {
        $oReq = &App::getRequest();
        $oSrvSec = &App::getModuleService('Account', 'Security');
               
        $oSrvShoutbox = $this->_oModule->getService('Shoutbox');
        $oUrl = App::getUrl();
        
        $sNewUrl = $oReq->getInt('group') ? $oUrl->getUrl().'group_'.$oReq->getInt('group') : $oUrl->getUrl();
        
        $oTpl = &$this->_oModule->getTemplate();
        $oTpl->assign(array(
                            'aShout'   => $oSrvShoutbox->getMessage($oReq->getInt('group')),
                            'sImageUrl' => App::getParam('user.pic.url'),
                            'iGroup'    => $oReq->getInt('group'),
                        ));
  
        $sHtml = $oTpl->fetch('Box.html');
        
        return $sHtml;
    }
}
?>